#ifndef __IPC_TIMER_H__
#define __IPC_TIMER_H__

#include "ipc_typedef.h"
#include "ipc_timestamp.h"
#include "ipc_list.h"

#define IPC_TIMER_EXEXUTE_FOREVER 0xFFFFFFFF

typedef void (*timerFunc)(void *);
typedef struct{
	timerFunc			func;
	ipcTimestamp_s		timestamp;
	void				*funcCtx;
	int					executeNumber;
	int					period;     //millisecond
	
	struct list_head	list;
}ipcTimer_s;

ipcRet_e	ipcTimerInit(void **timerHandle);
ipcRet_e	ipcTimerDeinit(void **timerHandle);
ipcRet_e	ipcTimerAdd(const void* timerHandle, ipcTimer_s timer);
ipcRet_e	ipcTimerDelete(const void* timerHandle,ipcTimer_s timer);
ipcRet_e 	ipcTimerExecute(const void* timerHandle);
void 		ipcTimerDump(const void* timerHandle);

#endif
